DesktopCreator = function(serverId, channelSubId) {
	MyDesktop = new Ext.app.App({
		id : 'mydesktop',
		init : function() {
			Ext.ComponentMgr.register(this);
			Ext.QuickTips.init();
			this.on('ready', function() {

				/*
				 * // Funktioniert so leider nicht. TODO: FIX // create all
				 * windows for those apps which have autostart enabled var
				 * mymodules = this.getModules(); console.info("No of modules: "
				 * +mymodules.length); for(var i=0; i<mymodules.length; i++) {
				 * var mymodule = mymodules[i]; if(mymodule) { if
				 * (mymodule.autostart) { console.info("Creating window for "
				 * +mymodule.id); mymodule.createWindow(); } } }
				 * 
				 */
				
					mymodule = this.getModule("slidespreview_win");
					if (mymodule.autostart) {
						mymodule.createWindow();
					}
					mymodule = this.getModule("slidewin");
					if (mymodule.autostart) {
						mymodule.createWindow();
					}
					mymodule = this.getModule("browser-win");
					if (mymodule.autostart) {
						mymodule.createWindow();
					}
					mymodule = this.getModule("ref-win");
					if (mymodule.autostart) {
						mymodule.createWindow();
					}
					mymodule = this.getModule("qref-win");
					if (mymodule.autostart) {
						mymodule.createWindow();
					}
					mymodule = this.getModule("bookmarklet-win");
					if (mymodule.autostart) {
						mymodule.createWindow();
					}
					mymodule = this.getModule("sharereq-win");
					if (mymodule.autostart) {
						mymodule.createWindow();
					}
					mymodule = this.getModule("shareref-win");
					if (mymodule.autostart) {
						mymodule.createWindow();
					}
					mymodule = this.getModule("addsemanticrelation-win");
					if (mymodule.autostart) {
						mymodule.createWindow();
					}
					mymodule = this.getModule("notesviewer-win");
					if (mymodule.autostart) {
						mymodule.createWindow();
					}
					mymodule = this.getModule("addnote-win");
					if (mymodule.autostart) {
						mymodule.createWindow();
					}
					mymodule = this.getModule("graph-win");
					if (mymodule.autostart) {
						mymodule.createWindow();
					}
			});
		},

		getModules : function() {
			return [ new ChatWindow(), new VideoWindow({
				serverId : serverId,
				channelSubId : channelSubId
			}), new SlidesThumbsWindow({
				serverId : serverId,
				channelSubId : channelSubId
			}), new SlideWindow(), new BrowserWindow(), new ReferenceWindow(),
					new QueuedReferenceWindow(), new BookmarkletWindow(),
					new ShareRequestWindow(), new ShareReferenceWindow(), new AddSemanticRelationWindow(),
					new NotesViewerWindow(), new AddNoteWindow(), new GraphWindow() ];
		},
		// config for the start menu
		getStartConfig : function() {
			return {
				// title: 'Kai H&ouml;ver',
				title : 'CCLS',
				iconCls : 'user',
				toolItems : [ {
					text : 'Settings',
					iconCls : 'settings',
					scope : this
				}, '-', {
					text : 'Logout',
					iconCls : 'logout',
					scope : this,
					handler : function(){
						Ext.Ajax.request({
							url: 'openid',
							method: "GET",
							params: 'logout=true',
							success: function(resp) {
								window.location="./";
								return;
							},
							failure: function(resp){
								alert(resp.responseText);
							}
							
						});
						
					}
				} ]
			};
		}
	});

	

};
